package com.fh.shop.api.cate.controller;

import com.fh.shop.api.cate.biz.ICateService;
import com.fh.shop.api.common.ServerResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/cates")
public class CateController{
    @Resource(name = "cateService")
    private ICateService cateService;

    private static Logger logger = LoggerFactory.getLogger(CateController.class);

    @GetMapping
    public ServerResponse findList() throws InterruptedException {
        logger.info("查询分类列表");
        return cateService.findList();
    }

}
